<div class="container">
	<div class="toolbar">
		<a href="{:url('baidu')}" class="btn ajax">百度推送</a>
		<a href="{:url('sitemap')}" class="btn ajax" >生成站长地图</a>
	</div>

<div class="table">
	<table>
		<thead>
			<tr>
				<th style="width: 60px;">编号</th>
				<th>标题</th>
				<th style="width: 60px;">数量</th>
				<th style="width: 60px;" >操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="vo"}
			<tr>
				<td>{$vo['id']}</td>
				<td><a href="{$vo['url']}" target="_blank">{$vo['name']}</a></td>
				<td>{:db_count('post',['cid'=>$vo['id']])}</td>
				<td style="text-align: right;">
					{if empty($vo['_child'])}
						{if $vo['mid']!=1}
							<a href="{:url('post/add?cid='.$vo['id'])}">发布</a>
                            <a href="{:url('post/index?cid='.$vo['id'])}">管理</a>
                        {else}
                        	<a href="{:url('cate/page?id='.$vo['id'])}">管理</a>
						{/if}
					
					{elseif $vo['mid']==1 }
						<a href="{:url('cate/page?id='.$vo['id'])}">管理</a>
					{/if}
					
				</td>
			</tr>
			{if !empty($vo['_child'])}
			{volist name="$vo['_child']" id="vo_one"}
			<tr>
				<td>{$vo_one['id']}</td>
				<td><a href="{$vo_one['url']}" target="_blank" style="text-indent: 2em;">{$vo_one['name']}</a></td>
				<td>{:db_count('post',['cid'=>$vo_one['id']])}</td>
				<td style="text-align: right;">
					{if $vo_one['mid']!=1}
					<a href="{:url('post/add?cid='.$vo_one['id'])}">发布</a>
                    <a href="{:url('post/index?cid='.$vo_one['id'])}">管理</a>
                    {else}
                    <a href="{:url('cate/page?id='.$vo_one['id'])}">管理</a>
					{/if}
					
				</td>
			</tr>
			{/volist}
			{/if}
			{/volist}
		 </tbody>
	</table>
</div>

</div>